package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.BsDailyMapper;
import com.ruoyi.project.system.domain.BsDaily;
import com.ruoyi.project.system.service.IBsDailyService;

/**
 * 日报Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-06-09
 */
@Service
public class BsDailyServiceImpl implements IBsDailyService 
{
    @Autowired
    private BsDailyMapper bsDailyMapper;

    /**
     * 查询日报
     * 
     * @param id 日报ID
     * @return 日报
     */
    @Override
    public BsDaily selectBsDailyById(String id)
    {
        return bsDailyMapper.selectBsDailyById(id);
    }

    /**
     * 查询日报列表
     * 
     * @param bsDaily 日报
     * @return 日报
     */
    @Override
    public List<BsDaily> selectBsDailyList(BsDaily bsDaily)
    {
        return bsDailyMapper.selectBsDailyList(bsDaily);
    }

    /**
     * 新增日报
     * 
     * @param bsDaily 日报
     * @return 结果
     */
    @Override
    public int insertBsDaily(BsDaily bsDaily)
    {
        bsDaily.setCreateTime(DateUtils.getNowDate());
        return bsDailyMapper.insertBsDaily(bsDaily);
    }

    /**
     * 修改日报
     * 
     * @param bsDaily 日报
     * @return 结果
     */
    @Override
    public int updateBsDaily(BsDaily bsDaily)
    {
        return bsDailyMapper.updateBsDaily(bsDaily);
    }

    /**
     * 批量删除日报
     * 
     * @param ids 需要删除的日报ID
     * @return 结果
     */
    @Override
    public int deleteBsDailyByIds(String[] ids)
    {
        return bsDailyMapper.deleteBsDailyByIds(ids);
    }

    /**
     * 删除日报信息
     * 
     * @param id 日报ID
     * @return 结果
     */
    @Override
    public int deleteBsDailyById(String id)
    {
        return bsDailyMapper.deleteBsDailyById(id);
    }
}
